import request from '@/utils/request'


export function querySstInfAll(query) {
  return request({
    url: '/infManage/querySstInfAll',
    method: 'get',
    params: query
  })
}
// 查询接口列表
export function listInf(query) {
  return request({
    url: '/infManage/list',
    method: 'get',
    params: query
  })
}
export function listByCondition(query) {
  return request({
    url: '/infManage/listByCondition',
    method: 'get',
    params: query
  })
}

// 查询接口列表
export function queryInfAll(query) {
  return request({
    url: '/infManage/queryInfAll',
    method: 'get',
    params: query
  })
}
// 查询接口列表（排除节点）
export function listInfExcludeChild(infId) {
  return request({
    url: '/infManage/list/exclude/' + infId,
    method: 'get'
  })
}

// 查询接口详细
export function getInf(infId) {
  return request({
    url: '/infManage/' + infId,
    method: 'get'
  })
}

// 查询接口下拉树结构
export function treeselect() {
  return request({
    url: '/infManage/treeselect',
    method: 'get'
  })
}

// 新增接口
export function addInf(data) {
  return request({
    url: '/infManage',
    method: 'post',
    data: data
  })
}

export function addReport(data) {
  return request({
    url: '/infReport',
    method: 'post',
    data: data
  })
}
// 修改接口
export function updateInf(data) {
  return request({
    url: '/infManage',
    method: 'put',
    data: data
  })
}

// 删除接口
export function delInf(deptId) {
  return request({
    url: '/infManage/' + deptId,
    method: 'delete'
  })
}

// 首页接口计数
export function countInf() {
  return request({
    url: '/infManage/countInf',
    method: 'get'
  })
}

// 复制接口
export function copyInf(infId) {
  return request({
    url: '/infManage/copy/' + infId,
    method: 'get'
  })
}

//查询接口列表
export function childrenList(infId) {
  return request({
    url: '/infManage/childrenList/' + infId,
    method: 'get'
  })
}
